/***************************************************************************
 *   Copyright (C) 2009 by Zheng Yonglei
 *   zhengyonglei@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef TYPES_H_
#define TYPES_H_

#include <vector>
#include <iostream>

#include <QString>
 #include <QCoreApplication>

using namespace std;

/*#define WS_UNTOUCHED 	QString(" 0 ")
#define WS_FINISHED 		QString(" 1 ")
#define WS_RECITING 		QString(" 2 ")
#define WS_REVIEWING 		QString(" 3 ")
*/

/*enum Language
{
	//L_Defualt,
	L_Chinese,
	L_English
};*/

enum WordStatus
{
	WS_Untouched = 0,
	WS_Finished,
	WS_Reciting,
	WS_Reviewing,
	WS_Associate
};

enum WordManagerTaskType
{
	TaskType_None,
	TaskType_Browse,
	TaskType_Recite
};

enum SelectWordsMethod
{
	//select_by_auto_increase_id,
	select_by_list_name,
	//select_by_vector,
	//select_randomly
	select_by_active_status, //already selected
	select_by_resume_list
};

/*enum BrowseType
{
	BT_Test,
	BT_Search,
	BT_Browse
};*/

/*enum ReciteTestError
{
	recite_test_err_no_word,
	recite_test_err_test_finished,
	recite_test_err_no_error
};*/

enum TestMethod
{
	yes_no_method,
	multi_exp_choice_method,
	multi_English_choice_method,
	spell_method,
	none_method
};

enum WordListType
{
	red_bible_list,
	custom_list,
	none
};

struct WordManagerTask
{
	WordManagerTaskType taskType;
	//for common useage
	SelectWordsMethod selectWordMethod;
	int beginWordID;
	int endWordID;
	QString listName;
	WordListType listType;
	vector<int>wordIDs;
};

/*enum DictDescriptor
{
	dict_GRERedBible = 1,
	dict_PowerWord,
	dict_AHD,
	dict_MWCDi,
	dict_MWCTh,
	dict_Longman,
	dict_XDICT,
	dict_Oxford,
};*/

class DictNames
{
public:
	const static QString GRERedBible;
	const static QString PowerWordDict;
	const static QString AHDDict;
	const static QString MWCDiDict;
	const static QString MWCThDict;
	const static QString LongmanDict;
	const static QString XDICTDict;
	const static QString OxfordDict;

	static QString getDataBaseColumnName(QString dictName);
	//static DictDescriptor name2Descriptor(QString dictName);
	//static QString descriptor2Name(DictDescriptor dictDescriptor);
};

#endif /* TYPES_H_ */
